<?php
/**
 * ============================================================================
 * @copyright China International Consulting. 中国国际咨询
 * @version:  v1.0
 * @website   http://www.chinacons.com
 * ---------------------------------------------
 * $Date: 2007.12.17
*/

  include(dirname(__file__) . "/config.php");
  $per = explode(',',$_SESSION["permission"]);	
  for($i=0;$i<count($per);$i++)
  {
	if($per[$i]==0&$per[$i]!='')
	{
		$p0 ='<li id="current" onclick="change_style( this)">
	<a href="bottom.php?id=0" target="bottom"><span>內容配置
	</span></a></li>';
		
	}
	if($per[$i]==6)
	{
		$p6 ='<li onclick="change_style( this)"><a href="bottom.php?id=6" target="bottom"><span>內容頁面
	</span></a></li>';
		
	}
	if($per[$i]==7)
	{
		$p7 ='<li onclick="change_style( this)"><a href="bottom.php?id=7" target="bottom"><span>出租管理
	</span></a></li>';
		
	}
	if($per[$i]==8)
	{
		$p8 ='<li onclick="change_style( this)"><a href="bottom.php?id=8" target="bottom"><span>出售管理
	</span></a></li>';
		
	}
	if($per[$i]==9)
	{
		$p9 ='<li onclick="change_style( this)"><a href="bottom.php?id=9" target="bottom"><span>系統管理
	</span></a></li>';
		
	}
	if($per[$i]==10)
	{
		$p10 ='<li onclick="change_style( this)"><a href="bottom.php?id=10" target="bottom"><span>頂讓管理
	</span></a></li>';
		
	}
	if($per[$i]==12)
	{
		$p12 ='<li onclick="change_style( this)"><a href="bottom.php?id=12" target="bottom"><span>會員管理
	</span></a></li>';
		
	}
	if($per[$i]==13)
	{
		$p13='<li onclick="change_style( this)"><a href="bottom.php?id=13" target="bottom"><span>回報管理
	</span></a></li>';
		
	}
	if($per[$i]==14)
	{
		$p14 ='<li onclick="change_style( this)"><a href="bottom.php?id=14" target="bottom"><span>尋房診療室
	</span></a></li>';
		
	}
  }

  $tpl = new PhplibTpl("templates");
  $tpl->set_file("top", "top.htm");
  $tpl -> set_var(array(
					"USER_ID" => $user_id,
					"USERNAME" => $username,
					"DEL_URL" => $del_url,
					"last_visit" => $user_lastvisit,
					"USER_REGDATE" => $user_regdate,
					"REAL_NAME" => $sin_name,
					"user_email" => $user_email,
					"p0" => $p0,
					"p6" => $p6,
					"p7" => $p7,
					"p8" => $p8,
					"p9" => $p9,
					"p10" =>$p10,
					"p12" => $p12,
					"p13" => $p13,
					"p14" => $p14,
					));  
  $tpl->set_var("name",$_SESSION['name']);
  $tpl->parse("Out_top", "top");
  $tpl->p("Out_top");
?>